{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 集思录新股\n",
    "\n",
    "- 作者：DGC'Idea\n",
    "- 版本：V0.1   \n",
    "- 更新日期：2018年3月21日\n",
    "\n",
    "----------\n",
    "\n",
    "- 研究目的：获取新股发行、申购的相关信息；\n",
    "- 研究方法：从集思录网站爬取发行、申购相关数据。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": "数据已准备好！\n"
    }
   ],
   "source": [
    "#导入库\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import urllib.request\n",
    "import json,re,os\n",
    "\n",
    "#引入自定义库\n",
    "import sys\n",
    "sys.path.append('../DS')\n",
    "from ds_jisilu import *\n",
    "\n",
    "#设置pd显示行列数目\n",
    "pd.set_option('display.max_rows',500)\n",
    "pd.set_option('display.max_columns',100)\n",
    "pd.set_option('display.width',10000)\n",
    "pd.set_option('max_colwidth', 100)\n",
    "\n",
    "#新股\n",
    "def get_new_stock(data_type):\n",
    "    try:\n",
    "        df=get_jsl_data(data_type)\n",
    "        #整理数据\n",
    "#         for i in range(len(data_df)): \n",
    "#             df['jsl_theory_price'].iloc[i]=re.sub(r'\\<a([^\\<]+)\\</a>',r'',df['jsl_theory_price'].iloc[i])\n",
    "#             df['apply_dt'].iloc[i]=re.sub(r'\\<span([^\\<]+)\\>',r'',df['apply_dt'].iloc[i])\n",
    "#             df['apply_cd'].iloc[i]=re.sub(r'\\<span([^\\<]+)\\>',r'',df['apply_cd'].iloc[i])\n",
    "#             df['apply_dt'].iloc[i]=re.sub(r'\\</span>',r'',df['apply_dt'].iloc[i])\n",
    "#             df['apply_cd'].iloc[i]=re.sub(r'\\</span>',r'',df['apply_cd'].iloc[i])\n",
    "#             if df['market'].iloc[i]=='sh':\n",
    "#                 df['market'].iloc[i]='上海'\n",
    "#             else:\n",
    "#                 df['market'].iloc[i]='深圳'\n",
    "       \n",
    "        #更改列标题\n",
    "        df=df.rename(columns={\n",
    "            'stock_cd':'代码','stock_nm':'名称',\n",
    "            'apply_dt':'申购日','apply_cd':'申购代码',\n",
    "            'need_market_value':'需市值(万)','issue_price':'发行价',\n",
    "            'individual_limit':'限购(万股)','money_out_dt':'缴款日',\n",
    "            'lucky_draw_rt':'中签率','list_dt':'上市日',          \n",
    "            'issue_show':'发行市值(亿)',\n",
    "            'jsl_theory_price':'开板价(估)','theory_price':'开板价',\n",
    "            'theory_profit':'单签收益(元)','profit_rt':'收益率',\n",
    "            'market':'市场',\n",
    "            #'jsl_advise':'申购建议',\n",
    "             }) \n",
    "        print(' 数据已准备好！')        \n",
    "    except Exception as e:\n",
    "        print(' 数据获取失败！')\n",
    "    return df\n",
    "\n",
    "data_df=get_new_stock('hit_stock')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.待申购新股"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>代码</th>\n      <th>名称</th>\n      <th>申购日</th>\n      <th>申购代码</th>\n      <th>需市值(万)</th>\n      <th>发行价</th>\n      <th>限购(万股)</th>\n      <th>缴款日</th>\n      <th>市场</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>688086</td>\n      <td>紫晶存储</td>\n      <td>02-17(周一)</td>\n      <td>787086</td>\n      <td>13.50</td>\n      <td>-</td>\n      <td>1.350000</td>\n      <td>02-19(周三)</td>\n      <td>sh</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>603719</td>\n      <td>良品铺子</td>\n      <td>02-12(周三)</td>\n      <td>732719</td>\n      <td>12.00</td>\n      <td>11.90</td>\n      <td>1.200000</td>\n      <td>02-14(周五)</td>\n      <td>sh</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>688396</td>\n      <td>华润微</td>\n      <td>02-12(周三)</td>\n      <td>787396</td>\n      <td>84.50</td>\n      <td>-</td>\n      <td>8.450000</td>\n      <td>02-14(周五)</td>\n      <td>sh</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>688169</td>\n      <td>石头科技</td>\n      <td>02-11(周二)</td>\n      <td>787169</td>\n      <td>4.50</td>\n      <td>-</td>\n      <td>0.450000</td>\n      <td>02-13(周四)</td>\n      <td>sh</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>688177</td>\n      <td>百奥泰</td>\n      <td>02-11(周二)</td>\n      <td>787177</td>\n      <td>11.50</td>\n      <td>-</td>\n      <td>1.150000</td>\n      <td>02-13(周四)</td>\n      <td>sh</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>688233</td>\n      <td>神工股份</td>\n      <td>02-11(周二)</td>\n      <td>787233</td>\n      <td>11.00</td>\n      <td>-</td>\n      <td>1.100000</td>\n      <td>02-13(周四)</td>\n      <td>sh</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>688200</td>\n      <td>华峰测控</td>\n      <td>02-07(周五)</td>\n      <td>787200</td>\n      <td>3.50</td>\n      <td>-</td>\n      <td>0.350000</td>\n      <td>02-11(周二)</td>\n      <td>sh</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>300817</td>\n      <td>双飞股份</td>\n      <td>02-05(周三)</td>\n      <td>300817</td>\n      <td>8.00</td>\n      <td>-</td>\n      <td>0.800000</td>\n      <td>02-07(周五)</td>\n      <td>sz</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>603949</td>\n      <td>雪龙集团</td>\n      <td>02-05(周三)</td>\n      <td>732949</td>\n      <td>14.00</td>\n      <td>-</td>\n      <td>1.400000</td>\n      <td>02-07(周五)</td>\n      <td>sh</td>\n    </tr>\n    <tr>\n      <th>9</th>\n      <td>688090</td>\n      <td>瑞松科技</td>\n      <td>02-04(周二)</td>\n      <td>787090</td>\n      <td>4.50</td>\n      <td>-</td>\n      <td>0.450000</td>\n      <td>02-06(周四)</td>\n      <td>sh</td>\n    </tr>\n    <tr>\n      <th>10</th>\n      <td>688208</td>\n      <td>道通科技</td>\n      <td>02-03(周一)</td>\n      <td>787208</td>\n      <td>9.50</td>\n      <td>-</td>\n      <td>0.950000</td>\n      <td>02-05(周三)</td>\n      <td>sh</td>\n    </tr>\n  </tbody>\n</table>\n</div>",
      "text/plain": "        代码    名称        申购日    申购代码 需市值(万)    发行价    限购(万股)        缴款日  市场\n0   688086  紫晶存储  02-17(周一)  787086  13.50      -  1.350000  02-19(周三)  sh\n1   603719  良品铺子  02-12(周三)  732719  12.00  11.90  1.200000  02-14(周五)  sh\n2   688396   华润微  02-12(周三)  787396  84.50      -  8.450000  02-14(周五)  sh\n3   688169  石头科技  02-11(周二)  787169   4.50      -  0.450000  02-13(周四)  sh\n4   688177   百奥泰  02-11(周二)  787177  11.50      -  1.150000  02-13(周四)  sh\n5   688233  神工股份  02-11(周二)  787233  11.00      -  1.100000  02-13(周四)  sh\n6   688200  华峰测控  02-07(周五)  787200   3.50      -  0.350000  02-11(周二)  sh\n7   300817  双飞股份  02-05(周三)  300817   8.00      -  0.800000  02-07(周五)  sz\n8   603949  雪龙集团  02-05(周三)  732949  14.00      -  1.400000  02-07(周五)  sh\n9   688090  瑞松科技  02-04(周二)  787090   4.50      -  0.450000  02-06(周四)  sh\n10  688208  道通科技  02-03(周一)  787208   9.50      -  0.950000  02-05(周三)  sh"
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df=data_df[(data_df['中签率']=='-') & (data_df['申购日']!='-')]\n",
    "df=df.loc[:,(\n",
    "    '代码','名称',\n",
    "    '申购日','申购代码',\n",
    "    '需市值(万)','发行价',\n",
    "    '限购(万股)','缴款日',\n",
    "    '市场',\n",
    "    )]\n",
    "\n",
    "#重置索引\n",
    "df=df.reset_index()\n",
    "del df['index']\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2.已申购新股"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>代码</th>\n      <th>名称</th>\n      <th>申购日</th>\n      <th>申购代码</th>\n      <th>需市值(万)</th>\n      <th>发行价</th>\n      <th>限购(万股)</th>\n      <th>缴款日</th>\n      <th>中签率</th>\n      <th>上市日</th>\n      <th>发行市值(亿)</th>\n      <th>开板价(估)</th>\n      <th>开板价</th>\n      <th>单签收益(元)</th>\n      <th>收益率</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>688080</td>\n      <td>映翰通</td>\n      <td>01-22(周三)</td>\n      <td>787080</td>\n      <td>3.50</td>\n      <td>27.63</td>\n      <td>0.350000</td>\n      <td>02-03(周一)</td>\n      <td>0.042%</td>\n      <td>-</td>\n      <td>3.62</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>688398</td>\n      <td>赛特新材</td>\n      <td>01-22(周三)</td>\n      <td>787398</td>\n      <td>5.50</td>\n      <td>24.12</td>\n      <td>0.550000</td>\n      <td>02-03(周一)</td>\n      <td>0.042%</td>\n      <td>-</td>\n      <td>4.82</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>688186</td>\n      <td>广大特材</td>\n      <td>01-21(周二)</td>\n      <td>787186</td>\n      <td>11.50</td>\n      <td>17.16</td>\n      <td>1.150000</td>\n      <td>01-23(周四)</td>\n      <td>0.046%</td>\n      <td>-</td>\n      <td>7.17</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>603893</td>\n      <td>瑞芯微</td>\n      <td>01-20(周一)</td>\n      <td>732893</td>\n      <td>12.00</td>\n      <td>9.68</td>\n      <td>1.200000</td>\n      <td>01-22(周三)</td>\n      <td>0.044%</td>\n      <td>-</td>\n      <td>4.07</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>300816</td>\n      <td>艾可蓝</td>\n      <td>01-17(周五)</td>\n      <td>300816</td>\n      <td>20.00</td>\n      <td>20.28</td>\n      <td>2.000000</td>\n      <td>01-21(周二)</td>\n      <td>0.016%</td>\n      <td>-</td>\n      <td>4.06</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <th>5</th>\n      <td>002975</td>\n      <td>博杰股份</td>\n      <td>01-16(周四)</td>\n      <td>002975</td>\n      <td>17.00</td>\n      <td>34.60</td>\n      <td>1.700000</td>\n      <td>01-20(周一)</td>\n      <td>0.014%</td>\n      <td>-</td>\n      <td>6.01</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <th>6</th>\n      <td>603195</td>\n      <td>公牛集团</td>\n      <td>01-16(周四)</td>\n      <td>732195</td>\n      <td>18.00</td>\n      <td>59.45</td>\n      <td>1.800000</td>\n      <td>01-20(周一)</td>\n      <td>0.049%</td>\n      <td>-</td>\n      <td>35.67</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <th>7</th>\n      <td>688298</td>\n      <td>东方生物</td>\n      <td>01-16(周四)</td>\n      <td>787298</td>\n      <td>8.50</td>\n      <td>21.25</td>\n      <td>0.850000</td>\n      <td>01-20(周一)</td>\n      <td>0.041%</td>\n      <td>-</td>\n      <td>6.38</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <th>8</th>\n      <td>603290</td>\n      <td>斯达半导</td>\n      <td>01-15(周三)</td>\n      <td>732290</td>\n      <td>16.00</td>\n      <td>12.74</td>\n      <td>1.600000</td>\n      <td>01-17(周五)</td>\n      <td>0.036%</td>\n      <td>-</td>\n      <td>5.10</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <th>9</th>\n      <td>300815</td>\n      <td>玉禾田</td>\n      <td>01-14(周二)</td>\n      <td>300815</td>\n      <td>13.50</td>\n      <td>29.55</td>\n      <td>1.350000</td>\n      <td>01-16(周四)</td>\n      <td>0.031%</td>\n      <td>01-23</td>\n      <td>10.22</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>&lt;span title=\"股票现价\" style=\"color:#aaa;font-style:italic\"&gt;42.55&lt;/span&gt;</td>\n      <td>&lt;span style=\"color:#aaa;font-style:italic\"&gt;6500&lt;/span&gt;</td>\n      <td>&lt;span style=\"color:#aaa;font-style:italic\"&gt;0.04%&lt;/span&gt;</td>\n    </tr>\n    <tr>\n      <th>10</th>\n      <td>688159</td>\n      <td>有方科技</td>\n      <td>01-14(周二)</td>\n      <td>787159</td>\n      <td>5.50</td>\n      <td>20.35</td>\n      <td>0.550000</td>\n      <td>01-16(周四)</td>\n      <td>0.042%</td>\n      <td>01-23</td>\n      <td>4.66</td>\n      <td>36~60</td>\n      <td>56.61</td>\n      <td>18130</td>\n      <td>0.15%</td>\n    </tr>\n    <tr>\n      <th>11</th>\n      <td>688266</td>\n      <td>泽璟制药</td>\n      <td>01-14(周二)</td>\n      <td>787266</td>\n      <td>11.00</td>\n      <td>33.76</td>\n      <td>1.100000</td>\n      <td>01-16(周四)</td>\n      <td>0.050%</td>\n      <td>01-23</td>\n      <td>20.26</td>\n      <td>45~64</td>\n      <td>74.59</td>\n      <td>20415</td>\n      <td>0.20%</td>\n    </tr>\n    <tr>\n      <th>12</th>\n      <td>688026</td>\n      <td>洁特生物</td>\n      <td>01-13(周一)</td>\n      <td>787026</td>\n      <td>7.00</td>\n      <td>16.49</td>\n      <td>0.700000</td>\n      <td>01-15(周三)</td>\n      <td>0.042%</td>\n      <td>01-22</td>\n      <td>4.12</td>\n      <td>33~55</td>\n      <td>53.36</td>\n      <td>18435</td>\n      <td>0.15%</td>\n    </tr>\n    <tr>\n      <th>13</th>\n      <td>688158</td>\n      <td>优刻得</td>\n      <td>01-08(周三)</td>\n      <td>787158</td>\n      <td>9.00</td>\n      <td>33.23</td>\n      <td>0.900000</td>\n      <td>01-10(周五)</td>\n      <td>0.051%</td>\n      <td>01-20</td>\n      <td>19.44</td>\n      <td>41~60</td>\n      <td>72.95</td>\n      <td>19860</td>\n      <td>0.20%</td>\n    </tr>\n    <tr>\n      <th>14</th>\n      <td>688100</td>\n      <td>威胜信息</td>\n      <td>01-07(周二)</td>\n      <td>787100</td>\n      <td>8.50</td>\n      <td>13.78</td>\n      <td>0.850000</td>\n      <td>01-09(周四)</td>\n      <td>0.047%</td>\n      <td>01-21</td>\n      <td>6.89</td>\n      <td>24~38</td>\n      <td>40.30</td>\n      <td>13260</td>\n      <td>0.12%</td>\n    </tr>\n    <tr>\n      <th>15</th>\n      <td>688278</td>\n      <td>特宝生物</td>\n      <td>01-07(周二)</td>\n      <td>787278</td>\n      <td>8.00</td>\n      <td>8.24</td>\n      <td>0.800000</td>\n      <td>01-09(周四)</td>\n      <td>0.047%</td>\n      <td>01-17</td>\n      <td>3.83</td>\n      <td>13~19</td>\n      <td>35.30</td>\n      <td>13530</td>\n      <td>0.13%</td>\n    </tr>\n    <tr>\n      <th>16</th>\n      <td>601816</td>\n      <td>京沪高铁</td>\n      <td>01-06(周一)</td>\n      <td>780816</td>\n      <td>942.00</td>\n      <td>4.88</td>\n      <td>94.200000</td>\n      <td>01-08(周三)</td>\n      <td>0.789%</td>\n      <td>01-16</td>\n      <td>306.74</td>\n      <td>6~7</td>\n      <td>6.77</td>\n      <td>1890</td>\n      <td>0.15%</td>\n    </tr>\n    <tr>\n      <th>17</th>\n      <td>300813</td>\n      <td>泰林生物</td>\n      <td>01-03(周五)</td>\n      <td>300813</td>\n      <td>13.00</td>\n      <td>18.35</td>\n      <td>1.300000</td>\n      <td>01-07(周二)</td>\n      <td>0.014%</td>\n      <td>01-14</td>\n      <td>2.39</td>\n      <td>&lt;a href=\"/setting/member/\"&gt;会员&lt;/a&gt;</td>\n      <td>&lt;span title=\"股票现价\" style=\"color:#aaa;font-style:italic\"&gt;51.50&lt;/span&gt;</td>\n      <td>&lt;span style=\"color:#aaa;font-style:italic\"&gt;16575&lt;/span&gt;</td>\n      <td>&lt;span style=\"color:#aaa;font-style:italic\"&gt;0.05%&lt;/span&gt;</td>\n    </tr>\n    <tr>\n      <th>18</th>\n      <td>002971</td>\n      <td>和远气体</td>\n      <td>01-02(周四)</td>\n      <td>002971</td>\n      <td>16.00</td>\n      <td>10.82</td>\n      <td>1.600000</td>\n      <td>01-06(周一)</td>\n      <td>0.030%</td>\n      <td>01-13</td>\n      <td>4.33</td>\n      <td>24~38</td>\n      <td>25.26</td>\n      <td>7220</td>\n      <td>0.04%</td>\n    </tr>\n    <tr>\n      <th>19</th>\n      <td>603551</td>\n      <td>奥普家居</td>\n      <td>01-02(周四)</td>\n      <td>732551</td>\n      <td>12.00</td>\n      <td>15.21</td>\n      <td>1.200000</td>\n      <td>01-06(周一)</td>\n      <td>0.041%</td>\n      <td>01-15</td>\n      <td>6.09</td>\n      <td>35~58</td>\n      <td>23.78</td>\n      <td>8570</td>\n      <td>0.04%</td>\n    </tr>\n    <tr>\n      <th>20</th>\n      <td>688178</td>\n      <td>万德斯</td>\n      <td>01-02(周四)</td>\n      <td>787178</td>\n      <td>6.00</td>\n      <td>25.20</td>\n      <td>0.600000</td>\n      <td>01-06(周一)</td>\n      <td>0.041%</td>\n      <td>01-14</td>\n      <td>5.35</td>\n      <td>37~50</td>\n      <td>51.13</td>\n      <td>12965</td>\n      <td>0.11%</td>\n    </tr>\n    <tr>\n      <th>21</th>\n      <td>002973</td>\n      <td>侨银环保</td>\n      <td>12-25(周三)</td>\n      <td>002973</td>\n      <td>12.00</td>\n      <td>5.74</td>\n      <td>1.200000</td>\n      <td>12-27(周五)</td>\n      <td>0.038%</td>\n      <td>01-06</td>\n      <td>2.35</td>\n      <td>15~33</td>\n      <td>19.52</td>\n      <td>6890</td>\n      <td>0.05%</td>\n    </tr>\n    <tr>\n      <th>22</th>\n      <td>300812</td>\n      <td>易天股份</td>\n      <td>12-25(周三)</td>\n      <td>300812</td>\n      <td>19.00</td>\n      <td>21.46</td>\n      <td>1.900000</td>\n      <td>12-27(周五)</td>\n      <td>0.017%</td>\n      <td>01-09</td>\n      <td>4.16</td>\n      <td>45~66</td>\n      <td>72.85</td>\n      <td>25695</td>\n      <td>0.09%</td>\n    </tr>\n    <tr>\n      <th>23</th>\n      <td>688181</td>\n      <td>八亿时空</td>\n      <td>12-25(周三)</td>\n      <td>787181</td>\n      <td>6.00</td>\n      <td>43.98</td>\n      <td>0.600000</td>\n      <td>12-27(周五)</td>\n      <td>0.043%</td>\n      <td>01-06</td>\n      <td>10.61</td>\n      <td>56~76</td>\n      <td>61.29</td>\n      <td>8655</td>\n      <td>0.07%</td>\n    </tr>\n    <tr>\n      <th>24</th>\n      <td>688081</td>\n      <td>兴图新科</td>\n      <td>12-24(周二)</td>\n      <td>787081</td>\n      <td>5.00</td>\n      <td>28.21</td>\n      <td>0.500000</td>\n      <td>12-26(周四)</td>\n      <td>0.044%</td>\n      <td>01-06</td>\n      <td>5.19</td>\n      <td>50~68</td>\n      <td>52.73</td>\n      <td>12260</td>\n      <td>0.11%</td>\n    </tr>\n    <tr>\n      <th>25</th>\n      <td>300811</td>\n      <td>铂科新材</td>\n      <td>12-19(周四)</td>\n      <td>300811</td>\n      <td>14.00</td>\n      <td>26.22</td>\n      <td>1.400000</td>\n      <td>12-23(周一)</td>\n      <td>0.015%</td>\n      <td>12-30</td>\n      <td>3.78</td>\n      <td>54~79</td>\n      <td>102.50</td>\n      <td>38140</td>\n      <td>0.11%</td>\n    </tr>\n    <tr>\n      <th>26</th>\n      <td>002972</td>\n      <td>科安达</td>\n      <td>12-18(周三)</td>\n      <td>002972</td>\n      <td>13.00</td>\n      <td>11.49</td>\n      <td>1.300000</td>\n      <td>12-20(周五)</td>\n      <td>0.038%</td>\n      <td>12-27</td>\n      <td>5.06</td>\n      <td>23~39</td>\n      <td>29.32</td>\n      <td>8915</td>\n      <td>0.07%</td>\n    </tr>\n    <tr>\n      <th>27</th>\n      <td>603109</td>\n      <td>神驰机电</td>\n      <td>12-18(周三)</td>\n      <td>732109</td>\n      <td>14.00</td>\n      <td>18.38</td>\n      <td>1.400000</td>\n      <td>12-20(周五)</td>\n      <td>0.035%</td>\n      <td>12-31</td>\n      <td>6.74</td>\n      <td>33~45</td>\n      <td>32.03</td>\n      <td>13650</td>\n      <td>0.05%</td>\n    </tr>\n    <tr>\n      <th>28</th>\n      <td>688078</td>\n      <td>龙软科技</td>\n      <td>12-18(周三)</td>\n      <td>787078</td>\n      <td>5.00</td>\n      <td>21.59</td>\n      <td>0.500000</td>\n      <td>12-20(周五)</td>\n      <td>0.041%</td>\n      <td>12-30</td>\n      <td>3.82</td>\n      <td>40~58</td>\n      <td>48.90</td>\n      <td>13655</td>\n      <td>0.11%</td>\n    </tr>\n    <tr>\n      <th>29</th>\n      <td>688268</td>\n      <td>华特气体</td>\n      <td>12-17(周二)</td>\n      <td>787268</td>\n      <td>8.50</td>\n      <td>22.16</td>\n      <td>0.850000</td>\n      <td>12-19(周四)</td>\n      <td>0.043%</td>\n      <td>12-26</td>\n      <td>6.65</td>\n      <td>27~45</td>\n      <td>52.00</td>\n      <td>14920</td>\n      <td>0.13%</td>\n    </tr>\n    <tr>\n      <th>30</th>\n      <td>688123</td>\n      <td>聚辰股份</td>\n      <td>12-12(周四)</td>\n      <td>787123</td>\n      <td>8.50</td>\n      <td>33.25</td>\n      <td>0.850000</td>\n      <td>12-16(周一)</td>\n      <td>0.046%</td>\n      <td>12-23</td>\n      <td>10.04</td>\n      <td>47~75</td>\n      <td>79.53</td>\n      <td>23140</td>\n      <td>0.21%</td>\n    </tr>\n    <tr>\n      <th>31</th>\n      <td>601512</td>\n      <td>中新集团</td>\n      <td>12-11(周三)</td>\n      <td>780512</td>\n      <td>44.00</td>\n      <td>9.67</td>\n      <td>4.400000</td>\n      <td>12-13(周五)</td>\n      <td>0.088%</td>\n      <td>12-20</td>\n      <td>14.49</td>\n      <td>16~23</td>\n      <td>15.98</td>\n      <td>6310</td>\n      <td>0.06%</td>\n    </tr>\n    <tr>\n      <th>32</th>\n      <td>603995</td>\n      <td>甬金股份</td>\n      <td>12-11(周三)</td>\n      <td>732995</td>\n      <td>23.00</td>\n      <td>22.52</td>\n      <td>2.300000</td>\n      <td>12-13(周五)</td>\n      <td>0.045%</td>\n      <td>12-24</td>\n      <td>12.99</td>\n      <td>33~40</td>\n      <td>30.62</td>\n      <td>8100</td>\n      <td>0.04%</td>\n    </tr>\n    <tr>\n      <th>33</th>\n      <td>688089</td>\n      <td>嘉必优</td>\n      <td>12-10(周二)</td>\n      <td>787089</td>\n      <td>7.50</td>\n      <td>23.90</td>\n      <td>0.750000</td>\n      <td>12-12(周四)</td>\n      <td>0.046%</td>\n      <td>12-19</td>\n      <td>7.17</td>\n      <td>32~45</td>\n      <td>46.17</td>\n      <td>11135</td>\n      <td>0.10%</td>\n    </tr>\n    <tr>\n      <th>34</th>\n      <td>300807</td>\n      <td>天迈科技</td>\n      <td>12-05(周四)</td>\n      <td>300807</td>\n      <td>17.00</td>\n      <td>17.68</td>\n      <td>1.700000</td>\n      <td>12-09(周一)</td>\n      <td>0.016%</td>\n      <td>12-19</td>\n      <td>3.01</td>\n      <td>34~53</td>\n      <td>62.90</td>\n      <td>22610</td>\n      <td>0.07%</td>\n    </tr>\n    <tr>\n      <th>35</th>\n      <td>002970</td>\n      <td>锐明技术</td>\n      <td>12-04(周三)</td>\n      <td>002970</td>\n      <td>8.50</td>\n      <td>38.00</td>\n      <td>0.850000</td>\n      <td>12-06(周五)</td>\n      <td>0.026%</td>\n      <td>12-17</td>\n      <td>8.21</td>\n      <td>65~87</td>\n      <td>96.93</td>\n      <td>29465</td>\n      <td>0.15%</td>\n    </tr>\n    <tr>\n      <th>36</th>\n      <td>688037</td>\n      <td>芯源微</td>\n      <td>12-04(周三)</td>\n      <td>787037</td>\n      <td>5.00</td>\n      <td>26.97</td>\n      <td>0.500000</td>\n      <td>12-06(周五)</td>\n      <td>0.046%</td>\n      <td>12-16</td>\n      <td>5.66</td>\n      <td>43~65</td>\n      <td>64.50</td>\n      <td>18765</td>\n      <td>0.17%</td>\n    </tr>\n    <tr>\n      <th>37</th>\n      <td>603053</td>\n      <td>成都燃气</td>\n      <td>12-03(周二)</td>\n      <td>732053</td>\n      <td>26.00</td>\n      <td>10.45</td>\n      <td>2.600000</td>\n      <td>12-05(周四)</td>\n      <td>0.066%</td>\n      <td>12-17</td>\n      <td>9.29</td>\n      <td>22~29</td>\n      <td>22.04</td>\n      <td>11590</td>\n      <td>0.08%</td>\n    </tr>\n  </tbody>\n</table>\n</div>",
      "text/plain": "        代码    名称        申购日    申购代码  需市值(万)    发行价     限购(万股)        缴款日     中签率    上市日 发行市值(亿)                             开板价(估)                                                                   开板价                                                  单签收益(元)                                                      收益率\n0   688080   映翰通  01-22(周三)  787080    3.50  27.63   0.350000  02-03(周一)  0.042%      -    3.62  <a href=\"/setting/member/\">会员</a>                                                                     -                                                        -                                                        -\n1   688398  赛特新材  01-22(周三)  787398    5.50  24.12   0.550000  02-03(周一)  0.042%      -    4.82  <a href=\"/setting/member/\">会员</a>                                                                     -                                                        -                                                        -\n2   688186  广大特材  01-21(周二)  787186   11.50  17.16   1.150000  01-23(周四)  0.046%      -    7.17  <a href=\"/setting/member/\">会员</a>                                                                     -                                                        -                                                        -\n3   603893   瑞芯微  01-20(周一)  732893   12.00   9.68   1.200000  01-22(周三)  0.044%      -    4.07  <a href=\"/setting/member/\">会员</a>                                                                     -                                                        -                                                        -\n4   300816   艾可蓝  01-17(周五)  300816   20.00  20.28   2.000000  01-21(周二)  0.016%      -    4.06  <a href=\"/setting/member/\">会员</a>                                                                     -                                                        -                                                        -\n5   002975  博杰股份  01-16(周四)  002975   17.00  34.60   1.700000  01-20(周一)  0.014%      -    6.01  <a href=\"/setting/member/\">会员</a>                                                                     -                                                        -                                                        -\n6   603195  公牛集团  01-16(周四)  732195   18.00  59.45   1.800000  01-20(周一)  0.049%      -   35.67  <a href=\"/setting/member/\">会员</a>                                                                     -                                                        -                                                        -\n7   688298  东方生物  01-16(周四)  787298    8.50  21.25   0.850000  01-20(周一)  0.041%      -    6.38  <a href=\"/setting/member/\">会员</a>                                                                     -                                                        -                                                        -\n8   603290  斯达半导  01-15(周三)  732290   16.00  12.74   1.600000  01-17(周五)  0.036%      -    5.10  <a href=\"/setting/member/\">会员</a>                                                                     -                                                        -                                                        -\n9   300815   玉禾田  01-14(周二)  300815   13.50  29.55   1.350000  01-16(周四)  0.031%  01-23   10.22  <a href=\"/setting/member/\">会员</a>  <span title=\"股票现价\" style=\"color:#aaa;font-style:italic\">42.55</span>   <span style=\"color:#aaa;font-style:italic\">6500</span>  <span style=\"color:#aaa;font-style:italic\">0.04%</span>\n10  688159  有方科技  01-14(周二)  787159    5.50  20.35   0.550000  01-16(周四)  0.042%  01-23    4.66                              36~60                                                                 56.61                                                    18130                                                    0.15%\n11  688266  泽璟制药  01-14(周二)  787266   11.00  33.76   1.100000  01-16(周四)  0.050%  01-23   20.26                              45~64                                                                 74.59                                                    20415                                                    0.20%\n12  688026  洁特生物  01-13(周一)  787026    7.00  16.49   0.700000  01-15(周三)  0.042%  01-22    4.12                              33~55                                                                 53.36                                                    18435                                                    0.15%\n13  688158   优刻得  01-08(周三)  787158    9.00  33.23   0.900000  01-10(周五)  0.051%  01-20   19.44                              41~60                                                                 72.95                                                    19860                                                    0.20%\n14  688100  威胜信息  01-07(周二)  787100    8.50  13.78   0.850000  01-09(周四)  0.047%  01-21    6.89                              24~38                                                                 40.30                                                    13260                                                    0.12%\n15  688278  特宝生物  01-07(周二)  787278    8.00   8.24   0.800000  01-09(周四)  0.047%  01-17    3.83                              13~19                                                                 35.30                                                    13530                                                    0.13%\n16  601816  京沪高铁  01-06(周一)  780816  942.00   4.88  94.200000  01-08(周三)  0.789%  01-16  306.74                                6~7                                                                  6.77                                                     1890                                                    0.15%\n17  300813  泰林生物  01-03(周五)  300813   13.00  18.35   1.300000  01-07(周二)  0.014%  01-14    2.39  <a href=\"/setting/member/\">会员</a>  <span title=\"股票现价\" style=\"color:#aaa;font-style:italic\">51.50</span>  <span style=\"color:#aaa;font-style:italic\">16575</span>  <span style=\"color:#aaa;font-style:italic\">0.05%</span>\n18  002971  和远气体  01-02(周四)  002971   16.00  10.82   1.600000  01-06(周一)  0.030%  01-13    4.33                              24~38                                                                 25.26                                                     7220                                                    0.04%\n19  603551  奥普家居  01-02(周四)  732551   12.00  15.21   1.200000  01-06(周一)  0.041%  01-15    6.09                              35~58                                                                 23.78                                                     8570                                                    0.04%\n20  688178   万德斯  01-02(周四)  787178    6.00  25.20   0.600000  01-06(周一)  0.041%  01-14    5.35                              37~50                                                                 51.13                                                    12965                                                    0.11%\n21  002973  侨银环保  12-25(周三)  002973   12.00   5.74   1.200000  12-27(周五)  0.038%  01-06    2.35                              15~33                                                                 19.52                                                     6890                                                    0.05%\n22  300812  易天股份  12-25(周三)  300812   19.00  21.46   1.900000  12-27(周五)  0.017%  01-09    4.16                              45~66                                                                 72.85                                                    25695                                                    0.09%\n23  688181  八亿时空  12-25(周三)  787181    6.00  43.98   0.600000  12-27(周五)  0.043%  01-06   10.61                              56~76                                                                 61.29                                                     8655                                                    0.07%\n24  688081  兴图新科  12-24(周二)  787081    5.00  28.21   0.500000  12-26(周四)  0.044%  01-06    5.19                              50~68                                                                 52.73                                                    12260                                                    0.11%\n25  300811  铂科新材  12-19(周四)  300811   14.00  26.22   1.400000  12-23(周一)  0.015%  12-30    3.78                              54~79                                                                102.50                                                    38140                                                    0.11%\n26  002972   科安达  12-18(周三)  002972   13.00  11.49   1.300000  12-20(周五)  0.038%  12-27    5.06                              23~39                                                                 29.32                                                     8915                                                    0.07%\n27  603109  神驰机电  12-18(周三)  732109   14.00  18.38   1.400000  12-20(周五)  0.035%  12-31    6.74                              33~45                                                                 32.03                                                    13650                                                    0.05%\n28  688078  龙软科技  12-18(周三)  787078    5.00  21.59   0.500000  12-20(周五)  0.041%  12-30    3.82                              40~58                                                                 48.90                                                    13655                                                    0.11%\n29  688268  华特气体  12-17(周二)  787268    8.50  22.16   0.850000  12-19(周四)  0.043%  12-26    6.65                              27~45                                                                 52.00                                                    14920                                                    0.13%\n30  688123  聚辰股份  12-12(周四)  787123    8.50  33.25   0.850000  12-16(周一)  0.046%  12-23   10.04                              47~75                                                                 79.53                                                    23140                                                    0.21%\n31  601512  中新集团  12-11(周三)  780512   44.00   9.67   4.400000  12-13(周五)  0.088%  12-20   14.49                              16~23                                                                 15.98                                                     6310                                                    0.06%\n32  603995  甬金股份  12-11(周三)  732995   23.00  22.52   2.300000  12-13(周五)  0.045%  12-24   12.99                              33~40                                                                 30.62                                                     8100                                                    0.04%\n33  688089   嘉必优  12-10(周二)  787089    7.50  23.90   0.750000  12-12(周四)  0.046%  12-19    7.17                              32~45                                                                 46.17                                                    11135                                                    0.10%\n34  300807  天迈科技  12-05(周四)  300807   17.00  17.68   1.700000  12-09(周一)  0.016%  12-19    3.01                              34~53                                                                 62.90                                                    22610                                                    0.07%\n35  002970  锐明技术  12-04(周三)  002970    8.50  38.00   0.850000  12-06(周五)  0.026%  12-17    8.21                              65~87                                                                 96.93                                                    29465                                                    0.15%\n36  688037   芯源微  12-04(周三)  787037    5.00  26.97   0.500000  12-06(周五)  0.046%  12-16    5.66                              43~65                                                                 64.50                                                    18765                                                    0.17%\n37  603053  成都燃气  12-03(周二)  732053   26.00  10.45   2.600000  12-05(周四)  0.066%  12-17    9.29                              22~29                                                                 22.04                                                    11590                                                    0.08%"
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df=data_df[data_df['中签率']!='-']\n",
    "df=df.loc[:,(\n",
    "    '代码','名称','申购日','申购代码',\n",
    "    '需市值(万)','发行价',\n",
    "    '限购(万股)','缴款日','中签率','上市日','发行市值(亿)',\n",
    "    '开板价(估)','开板价','单签收益(元)','收益率',\n",
    "    )]\n",
    "\n",
    "#重置索引\n",
    "df=df.reset_index()\n",
    "del df['index']\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.7.4 64-bit ('base': conda)",
   "language": "python",
   "name": "python37464bitbasecondad5f255661c6c454290a08f256a06a34d"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4-final"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}